package leetcode_2401_2500;

public class LeeCode_2486 {
    public static void main(String[] args) {

    }
    private static int appendCharacters(String s, String t) {
        int i = 0, j = 0;
        char c = t.charAt(0);
        while (i < s.length()){
            if (s.charAt(i) == c){
                j++;
                if (j == t.length())
                    return 0;
                c = t.charAt(j);
            }
            i++;
        }
        return t.length() - j;
    }
}
